﻿<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
    <title>学生信息列表</title>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        a, a:hover {
            text-decoration: none;
            cursor: pointer;
        }

        .modal.in .modal-dialog {
            -webkit-transform: translate(0, -50%);
            -ms-transform: translate(0, -50%);
            -o-transform: translate(0, -50%);
            transform: translate(0, -50%)
        }

        .modal-dialog {
            position: absolute;
            width: auto;
            left: 0;
            right: 0;
            top: 40%;
        }

        @media ( min-width: 768px) {
            #message .modal-dialog {
                width: 600px;
            }
        }

        #list th, #list td {
            text-align: center;
        }
    </style>
    <link href="${pageContext.request.contextPath}/static/css/bootstrap.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/static/js/jquery-1.12.4.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.js"></script>

</head>
<body class="container">
<div class="collapse navbar-collapse">
    <div class="navbar-right navbar-text" style="margin-right: 10px; ">
        <a style="display:inline;" id="onlineTotal"><i class="glyphicon glyphicon-ok"></i> ${onlineCount}人在线</a>
        <a style="display:inline;" id="loginUser" class="dropdown-header" data-toggle="modal"
           data-target="#loginDialog"><i class="glyphicon glyphicon-user"></i> ${loginInfo.userName}&nbsp;欢迎您！</a>
        <a style="display:inline-block;" class="dropdown-header" href="${pageContext.request.contextPath}/logout"><i
                class="glyphicon glyphicon-log-out"></i> 注销</a>
    </div>

</div>
<table id="list" class="table table-bordered table-hover">
    <thead>
    <tr>
        <th>序号</th>
        <th>用户编号</th>
        <th>姓名</th>
        <th>密码</th>
        <th>年龄</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="user" items="${users}" varStatus="s">
        <tr>
            <td>${s.index+1}</td>
            <td>${user.id}</td>
	        <td>${user.userName}</td>
            <td>${user.userPwd}</td>
            <td>${user.age}</td>
            <td><a href="javascript:">编辑</a>&nbsp;&nbsp;<a href="javascript:">删除</a></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>
